package com.whimscrew.area.service;

import com.whimscrew.area.config.FeignConfig;
import com.whimscrew.area.model.AreaStoreDTO;
import com.whimscrew.area.model.StoreDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;


//对应Eureka注册的商店服务名称
@FeignClient(value = "store",configuration = {FeignConfig.class})
public interface StoreService {


    /**
     * 获取某个地区的所有商店列表
     * @param areaCode 地区代码
     * @return  AreaStoreDTO
     */
    @GetMapping("/v1/store/{areaCode}/list")
    List<StoreDTO> storeList(@PathVariable("areaCode") String areaCode);

}
